package edu.spex.yjl.week03;

public class Student {
    String name;
    private int age;
    private int weight;
    int num;
    String id;
    static String grade = "自己的班级";
    static String major = "自己的专业";

    Student() {

    }

    Student(String name, int num, String id) {
        this.name = name;
        this.num = num;
        this.id = id;
    }

    Student(String name, int num, String id, int age, int weight) {
        this.name = name;
        this.num = num;
        this.id = id;
        this.age = age;
        this.weight = weight;
    }

    public static void main(String args[]) {

        Student s1 = new Student("猪小明", 1, "1");
        Student s2 = new Student("毛台", 2, "2");
        Student s3 = new Student("蘑菇头", 3, "3");
        Student s4 = new Student("自己", 4, "4", 4, 4);

        Student[] students = new Student[4];

        students[0] = s1;
        students[1] = s2;
        students[2] = s3;
        students[3] = s4;

        for (Student stuitem : students) {
            System.out.println(stuitem.name);
        }
    }
}
